home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 5
/
Amiga Tools 5.iso
/
tools
/
packer-tools
/
xpkatana
/
arexx
/
unpack_kat.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-03-01
|
2KB
|
73 lines
/*************************************************************************
Unpack_kat.rexx 0.2 (1.3.96) by Eric Sauvageau
Script for XPkatana - Will unpack the specified file. If "?" is used as
the source file, then a file requester will open, asking for the source.
Usage: Unpack_kat.rexx <filename>
**************************************************************************/
/*** We want answers!!! :) ***/
Options results
/*****
We need to get the shell's path, so XPKatana will be able to
locate the desired source file.
*****/
path = Pragma('D','')
If Right(path,1) ~= ':' Then path = path||'/'
/*** I wanna talk to ya :) ***/
Address 'KATANA'
/*** Retrieve the filename from the command line ***/
Parse Arg source
If source = "" Then Do
Say "You must specify a source filename!"
Exit 10
End
/*** Store the No Progress flag state. ***/
GETFLAG NOPROGRESS ; oldprogress = result
/*** Tell XPKatana to not open any progress window. ***/
SETFLAGS NOPROGRESS 1
/*** Tell XPKatana what is the source file. ***/
SETSOURCE source ; found = result
/*****
If XPKatana can't find it, then try again, but adding the
current process's full path.
*****/
IF (found = 'NOFILE') & (source ~= '?') Then SETSOURCE path||source
/***
Unpack the file, keeping the same filename (unless
"Handle Suffix" was previously enabled).
***/
Say "Unpacking..."
UNPACK ; error = result
If error = "ABORT" Then Do
Say "Unpacking aborted or failed!"
End
Else Do
Say "Done."
End
/*** Restore the no progress initial state and Exit ***/
SETFLAGS NOPROGRESS oldprogress
Exit